<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
    <script src="axios.js"></script>
</head>
<body>
<div id="div1">
<input type="text" placeholder="用户名" v-model="xinmin">
    <input type="text" placeholder="密码" v-model="mima">

<button @click="sendRequest(xinmin,mima)">我我我</button>
</div>
</body>
<script>
    new Vue({
        el:"#div1",
        data:{
            xinmin:"13819918879",
            mima:"517520"
        },
        methods:{
            sendRequest:(names,psds)=>{
                axios.post('http://localhost:666', {
                    name:names,
                    password:psds
                })
                    .then(function (response) {
                        console.log(response);
                    })
                    .catch(function (error) {
                        console.log(error);
                    });

            }
        }
    })
</script>
</html>